<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>一个很简单的问题，这样写代码不行吗？提示第10行有错..._慕课猿问</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">

    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <meta http-equiv="Cache-Control" content="no-transform " />

    <meta name="Keywords" content="JavaScript" />
    <meta name="Description" content="&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/D..." />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/css/base.css?v=1461734761" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/common-less.css?v=1461734761" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/layer.css" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/wenda/wenda_detail-less.css?v=1461734761" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/font-awesome.min.css" type="text/css" />
</head>
<body >
<!--头部-->

<include file="Public/header"/>

<!--主要部分-->
<div id="main">

    <div class="wenda clearfix">
        <div class="l wenda-main">

            <div class="qa-content" data-qid="315359">
                <div class="qa-content-inner ">
                    <!--问题详细内容-->
                    <div id="js-content-main">
                        <!--问题标题-->
                        <div class="detail-q-title clearfix">
                            <h1 class="js-qa-wenda-title detail-wenda-title l">一个很简单的问题，这样写代码不行吗？提示第10行有错误</h1>
                            <!-- 编辑 -->

                        </div>

                        <div id="js-qa-wenda" class="detail-wenda imgPreview rich-text"><p>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</p><p>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</p><p>&lt;head&gt;</p><p>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;</p><p>&lt;title&gt;无标题文档&lt;/title&gt;</p><p>&lt;/head&gt;</p><p><br /></p><p>&lt;body&gt;</p><p>&lt;script&gt;</p><p> var arr = ['100px','abc'-6,[],-98765,34,-2,0,'300', ,fuction(){alert(1);},null,document,[],true,'200px'-30,'23.45元',5,</p><p><span class="Apple-tab-span">	</span> Number('abc'),fuction(){alert(3);}];</p><p><span class="Apple-tab-span">	</span> window.onload = function(){</p><p><span class="Apple-tab-span">		</span> </p><p><span class="Apple-tab-span">		</span> }</p><p>&lt;/script&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;</p><p><br /></p></div>
                    </div>
                    <!--提问者-->
                    <div class="qa-header detail-user-tips">
                        <div class="qa-header-right r">
                            <!-- credit积分 -->
                            <div class="share-rl-tips share-posi js-share-statue">
                                <span>分享即可 +</span><strong>1积分</strong>
                                <span class="rule-arrow"></span>
                            </div>
                            <!-- share分享-->
                            <div class="small-share l wd-share">
                                <ul class="share-wrap">
                                    <li class="weichat-posi js-top-share">
                                        <div class="bdsharebuttonbox weichat-style bdshare-button-style0-16" data-tag="share_1" data-quesid="315359">
                                            <a href="#" class="bds_weixin icon-nav icon-share-weichat" data-cmd="weixin" title="分享到微信"></a>
                                            <a href="#" class="bds_qzone icon-nav icon-share-qq" data-cmd="qzone" title="分享到QQ空间"></a>
                                            <a href="#" class="bds_tsina icon-nav icon-share-weibo" data-cmd="tsina" title="分享到新浪微博"></a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <em class="split l"></em>
                            <!-- follow -->
                            <a href="javascript:void(0)" data-id="315359" title="关注" class="l wenda-add-collection js-collection-btn">
                                <i class="icon-heart"></i>
                                <span class="detail-hearts js-detail-follow">0</span>
                            </a>
                        </div>
                        <!-- 个人信息 -->
                        <div class="detail-user">
                            <span class="detail-provider">提问者</span>
                            <a href="/u/2982277/bbs" target="_blank" class="qa-author">图像789</a>
                            <a href="/about/faq?t=3" class="credit-tip" target="_blank">由此问题已获得 +1积分</a>
                        </div>

                    </div>
                </div>

            </div>
            <!--添加提问框框-->
            <div id="js-qa-comment-input" class="detail-comment-input js-msg-context clearfix">
                <div id="add-answer" class="detail-ci-avator">
                    <h3 class="answer-add-tip">添加回答</h3>
                    <button id="answer-frame" class="answer-btn"></button>
                </div>

                <div id="avator-wrap" class="detail-ci-avator answer-hidden">
                    <img src="http://img.mukewang.com/user/5715d9050001b7f701220120-80-80.jpg" alt="" />
                    <div class="detail-r clearfix">
                        <span class="detail-name">威威快乐2016</span>
                        <p class="detail-signal">Hello 牛人 ！</p>
                    </div>
                </div>
                <div id="js-reply-wrap" class="answer-hidden">
                    <div id="js-reply-editor-box" class="wd-comment-box js-ci-inner ">
                    </div>
                    <div id="js-qa-ci-footer" class="qa-ci-footer clearfix">
                        <span class="qa-tips l"></span>
                        <div class="qa-ci-footright">
                            <button id="js-wenda-ci-submit" class="btn btn-red detail-ans " data-qid="315359">回答</button>
                        </div>
                    </div>
                </div>


            </div>
            <!-- 回答数 -->
            <div class="ans_num">4回答</div>
            <!-- 回答回复 start -->
            <div class="ques-answer">
                <div class="answer-con first" id="id_161858">
                    <div class="user-pic l">
                        <a href="/u/2733631/bbs" target="_blank">
                            <img src="http://img.mukewang.com/5679027b0001ae9d01000100-100-100.jpg" width="40" height="40" alt="?" />
                        </a>
                    </div>
                    <!--.user end-->
                    <!--提问者的提问信息-->
                    <div class="detail-r">
                        <span class="time">5小时前</span>
                        <a class="detail-name" href="/u/2733631/bbs" target="_blank">qq_此生不换_4</a>
                        <a href="/about/faq?t=3" class="credit-tip">由此问题已获得 +3积分</a>
                        <p class="detail-signal">&nbsp;</p>
                    </div>
                    <div class="answer-content rich-text imgPreview"><p>script标签放在头部跟body都可以，这里面的报错是有两点，第一‘300’后面跟了两个逗号，第二function 少了个 n</p></div>
                    <div class="ctrl-bar js-msg-context clearfix js-reply-tool hide">
                        <div class="detail-editor-btns r">
                            <span class="qa-tips"></span>
                            <button class="btn btn-normal js-reply-cancel">取消</button>
                            <button class="btn btn-red js-reply-submit" data-id="161858">保存</button>
                        </div>
                    </div>
                    <div class="ctrl-bar clearfix js-wenda-tool">
                        <span class="had-solve" data-quesid="315359" data-replyid="161858">已被提问者采纳</span>
                        <span class="agree-with " data-ques-id="315359" data-answer-id="161858" data-hasop=""><b>赞同</b><em>1</em></span>
                        <span class="oppose " data-ques-id="315359" data-answer-id="161858" data-hasop="">反对</span>
                        <span class="reply" data-replynum="2" data-reply-id="161858" data-ques-uid="2982277"><em>2</em>个回复</span>
                    </div>
                    <!--.ctrl-bar end-->
                </div>

                <!--.answer-con end-->
                <div class="reply-con">
                    <ul class="reply-list">

                    </ul>
                    <!--.reply-list end-->
                    <div class="release-reply-con clearfix">
                        <div class="user-pic">
                            <a href="/u/3223822/bbs" target="_blank">
                                <img src="http://img.mukewang.com/5715d9050001b7f701220120-100-100.jpg" width="40" height="40" alt="?"/>
                            </a>
                        </div>
                        <!--.user-pic end-->
                        <div class="user-name">
                            <a href="/u/3223822/bbs" target="_blank">威威快乐2016</a>
                        </div>
                        <div class="textarea-con">
                            <textarea name="release-reply" id="release-reply" placeholder="写下你的回复"></textarea>
                        </div>
                        <p class="err-tip"></p>
                        <div class="userCtrl clearfix">
                            <div class="verify-code"></div>
                            <div class="do-reply-btn" data-answer-id="161858" data-ques-uid="2982277">回复</div>
                        </div>
                    </div>
                    <!--.release-reply-con end-->
                </div>
                <!--.reply-con end-->

            </div>
            <!-- 回答回复 end -->

            <div class="ques-answer">
                <div class="answer-con first" id="id_161844">
                    <div class="user-pic l">
                        <a href="/u/3184671/bbs" target="_blank">
                            <img src="http://img.mukewang.com/570b9f1a0001215201000100-100-100.jpg" width="40" height="40" alt="?" />
                        </a>
                    </div><!--.user end-->
                    <div class="detail-r">
                        <span class="time">5小时前</span>
                        <a class="detail-name" href="/u/3184671/bbs" target="_blank">无尽未来</a>
                        <p class="detail-signal">&nbsp;</p>
                    </div>


                    <div class="answer-content rich-text imgPreview"><p>大哥 你这第十行，，还要自己数， 太不科学了， 你的&lt;script &gt;是放在body里的 头部应该有&lt;script type=javascript&gt; &lt;/&gt;    我感觉是这样 </p></div>
                    <div class="ctrl-bar js-msg-context clearfix js-reply-tool hide">
                        <div class="detail-editor-btns r">
                            <span class="qa-tips"></span>
                            <button class="btn btn-normal js-reply-cancel">取消</button>
                            <button class="btn btn-red js-reply-submit" data-id="161844">保存</button>
                        </div>
                    </div>

                    <div class="ctrl-bar clearfix js-wenda-tool">

                        <span class="agree-with " data-ques-id="315359" data-answer-id="161844" data-hasop=""><b>赞同</b></span>

                        <span class="oppose " data-ques-id="315359" data-answer-id="161844" data-hasop="">反对</span>

                        <span class="reply" data-replynum="0" data-reply-id="161844" data-ques-uid="2982277"><em>0</em>个回复</span>

                    </div><!--.ctrl-bar end-->


                </div><!--.answer-con end-->
                <div class="reply-con">
                    <ul class="reply-list">

                    </ul><!--.reply-list end-->
                    <div class="release-reply-con clearfix">
                        <div class="user-pic">
                            <a href="/u/3223822/bbs" target="_blank">
                                <img src="http://img.mukewang.com/5715d9050001b7f701220120-100-100.jpg" width="40" height="40" alt="?"/>
                            </a>
                        </div>
                        <!--.user-pic end-->
                        <div class="user-name">
                            <a href="/u/3223822/bbs" target="_blank">威威快乐2016</a>
                        </div>
                        <div class="textarea-con">
                            <textarea name="release-reply" id="release-reply" placeholder="写下你的回复"></textarea>
                        </div>
                        <p class="err-tip"></p>
                        <div class="userCtrl clearfix">
                            <div class="verify-code"></div>
                            <div class="do-reply-btn" data-answer-id="161844" data-ques-uid="2982277">回复</div>
                        </div>
                    </div><!--.release-reply-con end-->
                </div><!--.reply-con end-->

            </div>
            <div class="ques-answer">
                <div class="answer-con first" id="id_161840">
                    <div class="user-pic l">
                        <a href="/u/2962376/bbs" target="_blank">
                            <img src="http://img.mukewang.com/56d4349b0001907901800180-100-100.jpg" width="40" height="40" alt="?" />
                        </a>
                    </div><!--.user end-->
                    <div class="detail-r">
                        <span class="time">5小时前</span>
                        <a class="detail-name" href="/u/2962376/bbs" target="_blank">堇延未七</a>
                        <p class="detail-signal">System.out.println(\&quot;I lo...</p>
                    </div>


                    <div class="answer-content rich-text imgPreview"><p>&lt;head&gt;&lt;/head&gt;用于定义文档的头部。头部元素有：&lt;title&gt; &lt;script&gt;  &lt;style&gt;  &lt;link&gt;  &lt;meta&gt;。</p></div>
                    <div class="ctrl-bar js-msg-context clearfix js-reply-tool hide">
                        <div class="detail-editor-btns r">
                            <span class="qa-tips"></span>
                            <button class="btn btn-normal js-reply-cancel">取消</button>
                            <button class="btn btn-red js-reply-submit" data-id="161840">保存</button>
                        </div>
                    </div>

                    <div class="ctrl-bar clearfix js-wenda-tool">

                        <span class="agree-with " data-ques-id="315359" data-answer-id="161840" data-hasop=""><b>赞同</b></span>

                        <span class="oppose " data-ques-id="315359" data-answer-id="161840" data-hasop="">反对</span>

                        <span class="reply" data-replynum="0" data-reply-id="161840" data-ques-uid="2982277"><em>0</em>个回复</span>




                    </div><!--.ctrl-bar end-->


                </div><!--.answer-con end-->
                <div class="reply-con">
                    <ul class="reply-list">

                    </ul><!--.reply-list end-->
                    <div class="release-reply-con clearfix">
                        <div class="user-pic">
                            <a href="/u/3223822/bbs" target="_blank">
                                <img src="http://img.mukewang.com/5715d9050001b7f701220120-100-100.jpg" width="40" height="40" alt="?"/>
                            </a>
                        </div>
                        <!--.user-pic end-->
                        <div class="user-name">
                            <a href="/u/3223822/bbs" target="_blank">威威快乐2016</a>
                        </div>
                        <div class="textarea-con">
                            <textarea name="release-reply" id="release-reply" placeholder="写下你的回复"></textarea>
                        </div>
                        <p class="err-tip"></p>
                        <div class="userCtrl clearfix">
                            <div class="verify-code"></div>
                            <div class="do-reply-btn" data-answer-id="161840" data-ques-uid="2982277">回复</div>
                        </div>
                    </div><!--.release-reply-con end-->
                </div><!--.reply-con end-->

            </div>
            <div class="ques-answer">
                <div class="answer-con first" id="id_161839">
                    <div class="user-pic l">
                        <a href="/u/2962376/bbs" target="_blank">
                            <img src="http://img.mukewang.com/56d4349b0001907901800180-100-100.jpg" width="40" height="40" alt="?" />
                        </a>
                    </div><!--.user end-->
                    <div class="detail-r">
                        <span class="time">5小时前</span>
                        <a class="detail-name" href="/u/2962376/bbs" target="_blank">堇延未七</a>
                        <p class="detail-signal">System.out.println(\&quot;I lo...</p>
                    </div>


                    <div class="answer-content rich-text imgPreview"><p>&lt;script&gt;要放到&lt;head&gt;里<br /></p></div>
                    <div class="ctrl-bar js-msg-context clearfix js-reply-tool hide">
                        <div class="detail-editor-btns r">
                            <span class="qa-tips"></span>
                            <button class="btn btn-normal js-reply-cancel">取消</button>
                            <button class="btn btn-red js-reply-submit" data-id="161839">保存</button>
                        </div>
                    </div>

                    <div class="ctrl-bar clearfix js-wenda-tool">

                        <span class="agree-with " data-ques-id="315359" data-answer-id="161839" data-hasop=""><b>赞同</b></span>

                        <span class="oppose " data-ques-id="315359" data-answer-id="161839" data-hasop="">反对</span>

                        <span class="reply" data-replynum="0" data-reply-id="161839" data-ques-uid="2982277"><em>0</em>个回复</span>




                    </div><!--.ctrl-bar end-->


                </div><!--.answer-con end-->
                <div class="reply-con">
                    <ul class="reply-list">

                    </ul><!--.reply-list end-->
                    <div class="release-reply-con clearfix">
                        <div class="user-pic">
                            <a href="/u/3223822/bbs" target="_blank">
                                <img src="http://img.mukewang.com/5715d9050001b7f701220120-100-100.jpg" width="40" height="40" alt="?"/>
                            </a>
                        </div>
                        <!--.user-pic end-->
                        <div class="user-name">
                            <a href="/u/3223822/bbs" target="_blank">威威快乐2016</a>
                        </div>
                        <div class="textarea-con">
                            <textarea name="release-reply" id="release-reply" placeholder="写下你的回复"></textarea>
                        </div>
                        <p class="err-tip"></p>
                        <div class="userCtrl clearfix">
                            <div class="verify-code"></div>
                            <div class="do-reply-btn" data-answer-id="161839" data-ques-uid="2982277">回复</div>
                        </div>
                    </div><!--.release-reply-con end-->
                </div><!--.reply-con end-->

            </div>

            <!-- 回答回复 end -->
            <div class="qa-comment-page">
            </div>

        </div>
        <!--右侧内容-->
        <div class="wenda-slider r">
            <div class="quiz"><a href="{:U('Wenda/question')}" class="js-quiz">我要提问</a></div>
            <!-- 相关问题 -->
            <div class="panel about-ques">
                <div class="panel-heading">
                    <h2 class="panel-title">相关问题</h2>
                </div>
                <div class="panel-body clearfix">
                    <div class="mkhotlist padtop">
                        <a class="relwenda" href="/wenda/detail/315370" target="_blank">用了两个for循环，为什么第二个for循环里面筛选的女生不显示呢？</a><i class="answer-num">2 回答</i>
                    </div>
                    <div class="mkhotlist ">
                        <a class="relwenda" href="/wenda/detail/315352" target="_blank">怎样一次性清除所有节点？</a><i class="answer-num">2 回答</i>
                    </div>
                    <div class="mkhotlist ">
                        <a class="relwenda" href="/wenda/detail/315342" target="_blank">我用select标签建了一个带有滚动条的下拉列表，怎么用CSS改变滚动条的样式？比如颜色，大小之类的</a><i class="answer-num">3 回答</i>
                    </div>
                    <div class="mkhotlist ">
                        <a class="relwenda" href="/wenda/detail/315313" target="_blank">这个怎么用？</a><i class="answer-num">3 回答</i>
                    </div>
                    <div class="mkhotlist bordbottom">
                        <a class="relwenda" href="/wenda/detail/315278" target="_blank">下面代码有var跟没有var的区别？</a><i class="answer-num">2 回答</i>
                    </div>
                </div>
            </div>
            <!-- 广告 -->
            <div class="advertisement">
                <a href="http://www.imooc.com/wenda/detail/315372" data-ast="yuanwendetailright_1_192" target="_blank">
                    <img src="http://img.mukewang.com/57209d900001503a02800100.jpg" title="慕课为你专属定制"/>
                </a>
            </div>
            <!--.advertisement end广告结束-->
            <!--.recommend-class start推荐分类-->
            <div class="recommend-class">
                <div class="title clearfix">
                    <h3>相关分类</h3>
                </div>
                <!--title end-->
                <ul class="cls-list">
                    <li>
                        <!--class-info start分类信息-->
                        <div class="class-info">
                            <!--分类图片-->
                            <div class="class-icon">
                                <a href="/wenda/17" target="_blank">
                                    <img src="http://img.mukewang.com/563aff440001e80700900090.jpg" alt="JavaScript"/>
                                </a>
                            </div>
                            <!--.class-icon end分类图片结束-->
                            <!--分类名字-->
                            <h4>
                                <a href="/wenda/17" target="_blank">JavaScript</a>
                            </h4>
                            <!--关注情况-->
                            <p class="follow-person">42522人关注</p>
                            <a href="javascript:void(0)" data-tag-id="17" class="follow ">关注</a>

                        </div>
                        <!--.class-info end分类信息结束-->
                        <!--相关分类问题-->
                        <div class="desc">
                            <a class="desc-link" href="/wenda/detail/315342" taget="_blank">我用select标签建了一个带有滚动条的下拉列表，怎么用CSS改变滚...</a>
                            <i class="answer-num">3 回答</i>
                        </div>
                        <div class="desc">
                            <a class="desc-link" href="/wenda/detail/315370" taget="_blank">用了两个for循环，为什么第二个for循环里面筛选的女生不显示呢？</a>
                            <i class="answer-num">2 回答</i>
                        </div>
                    </li>
                </ul>
                <!--.cls-list end-->
            </div>
            <!--.recommend-class end推荐分类结束-->

        </div>

    </div>
    <!--隐藏的内容-->
    <div id="reply-box" style="display:none;">
        <div class="js-qa-reply-ibox qa-reply-ibox clearfix" >
            <div class="qa-reply-iavator l">
                <a href="/myclub/otherquestion?uid=3223822" title="威威快乐2016">
                    <img src='http://img.mukewang.com/user/5715d9050001b7f701220120-40-40.jpg' width='40' height='40' />
                </a>
            </div>
            <div class="qa-reply-iwrap">
                <div class="qa-reply-iarea">
                    <textarea maxlength="2000" name="" id="" class="js-reply-ipt ipt"  placeholder="写下你的评论..."></textarea>
                </div>
                <div class="qa-reply-ifoot clearfix">
                    <div class="qa-reply-footright r">
                        <span class="qa-tips"></span>
                        <button class="btn-normal btn-mini js-ipt-cancel">取消</button>
                        <button class="btn-green btn-mini  js-ipt-submit">提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="pop-tips-layer"></div>
</div>

<!--底部-->

<include file="Public/footer"/>
<!--浮动条-->
<div id="J_GotoTop" class="elevator">
    <a class="elevator-weixin" href="javascript:;">
        <div class="elevator-weixin-box">
        </div>
    </a>
    <a class="elevator-msg" href="/user/feedback" target="_blank" id="feedBack"></a>
    <a class="elevator-app" href="http://www.imooc.com/mobile/app" >
        <div class="elevator-app-box">
        </div>
    </a>
    <a class="elevator-top" href="javascript:;" style="display:none" id="backTop"></a>
</div>

<div class="wd-scroll">
    <a href="#add-answer" class="answ">回答</a>
    <a href="/wenda/save" class="ques">提问</a>
    <a href="javascript:void(0)" class="to-top" title="返回顶部"><i class="icon-up2"></i></a>
    <a href="/user/feedback" class="feedback" title="意见反馈"><i class="icon-feedback"></i></a>
</div>

<div style="display: none">
</div>
</body>
</html>
